package mb.model;

import java.awt.Color;
import java.awt.event.MouseListener;  // +
import java.awt.event.MouseEvent;  // +
import javax.swing.JPanel;

public class Diagram extends JPanel implements MouseListener {  // &

  private Box box = new Box();

  public Diagram() {
    super();
    box.addMouseListener(this);  // +
    this.setBackground(Color.WHITE);  
    this.setLayout(null);
    this.add(box);
  }

  // {+}

  public void mouseClicked(MouseEvent e) {

  }

  public void mousePressed(MouseEvent e) {
    box.setSelected(!box.isSelected());
  }

  public void mouseReleased(MouseEvent e) {

  }

  public void mouseEntered(MouseEvent e) {

  }

  public void mouseExited(MouseEvent e) {
  
  }

}